<%= render :partial => "article" %>

<hr />

<h3 id="comments">Comments</h3>

<% for comment in @article.comments %>
<div class="comment" id="comment_<%= comment.id %>">
  <%= simple_format(h(comment.body)) %>
  <p class="coda">Posted by <%=h comment.author %> at <%= comment.created_at.to_formatted_s(:short) %>
    | <%= link_to "Permalink", :anchor => "comment_#{comment.id}" %>
    <% if logged_in? -%>
    | <%= link_to "Delete", comment_url(@article, comment), :confirm => "Are you sure?", :method => :delete, :href => delete_comment_url(@article,comment) %>
    <% end -%>
  </p>
</div>
<% end %>

<hr />

<%= render :partial => "comments/new" %>
